//
// Created by JYL on 2024-05-23.
//

#ifndef INC_11_HAL_WHOLE_I2C_HAL_H
#define INC_11_HAL_WHOLE_I2C_HAL_H

#include "stm32g4xx_hal.h"
void I2CStart(void);
void I2CStop(void);
unsigned char I2CWaitAck(void);
void I2CSendAck(void);
void I2CSendNotAck(void);
void I2CSendByte(unsigned char cSendByte);
unsigned char I2CReceiveByte(void);
void I2CInit(void);
//
void EEPROM_Write(uint8_t addr,uint8_t dat);
uint8_t EEPROM_Read(uint8_t addr);
void MCP4017_Write(uint8_t val);
uint8_t MCP4017_Read(void);


#endif //INC_11_HAL_WHOLE_I2C_HAL_H
